package patterns.observer;

/**
 * Created by lenovo on 2016/12/1 0001.
 * 观察者实体类
 */
public class OctalObserver extends Observer{
    public OctalObserver(Subject subject){
        this.subject = subject;
        this.subject.attach(this);
    }

    /**
     * 更新状态
     */
    @Override
    public void update() {
        System.out.println("Octal String : " + Integer.toOctalString(subject.getState()));
    }
}
